package com.distributedDataBase.controller;


import com.distributedDataBase.pojo.Result;
import com.distributedDataBase.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("review2")
public class RestControllerReview {

    @GetMapping("test01")
    public String test01() {
        return "test01";
    }

    @GetMapping("test02")
    public Result test02() {
        return new Result("200", "成功");
    }

    @GetMapping("test03")
    public Result test03() {
        List<User> users = new ArrayList();
        users.add(new User(1, "hhh", "123456", "123@163.com", 0));
        users.add(new User(1, "admin", "123456", "123@163.com", 1));
        return new Result("200", "返回用户所有信息", users);
    }

}
